package pl.edu.agh.uhm.upnp.discoverer;

import java.util.Dictionary;
import java.util.Properties;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import pl.edu.agh.uhm.discoverer.HypervisorsDiscoverer;

/**
 * Extension of the default OSGi bundle activator
 */
public final class Activator implements BundleActivator{
	
	
	static BundleContext context;
	
	
    public void start( BundleContext bc )throws Exception{
    	
    	context=bc;
        System.out.println( "STARTING pl.edu.agh.uhm.upnp.discoverer" );
        UPnPHypervisorsDiscoverer discoverer = new UPnPHypervisorsDiscoverer();
        discoverer.activate();
        bc.registerService( HypervisorsDiscoverer.class.getName(),discoverer, null );
    
    }

    /**
     * Called whenever the OSGi framework stops our bundle
     */
    public void stop( BundleContext bc )throws Exception{
    	
        System.out.println( "STOPPING pl.edu.agh.uhm.upnp.discoverer" );

        
    }
}

